import { CustomRoute } from "@/typings/router";

export const ROOT_ROUTE: CustomRoute = {
  path: "/",
  name: "root",
  redirect: import.meta.env.VITE_ROUTE_HOME_PATH,
  meta: {
    constant: true,
    keepAlive: false
  }
};

const ROUTE_404: CustomRoute = {
  name: "404",
  path: "/:pathMatch(.*)*",
  component: () => import("@/views/builtin/404/index.vue"),
  meta: {
    constant: true,
    keepAlive: false
  }
};

export const ROUTE_403: CustomRoute = {
  path: "/403",
  name: "403",
  component: () => import("@/views/builtin/403/index.vue"),
  meta: {
    constant: true,
    keepAlive: false
  }
};

export const ROUTE_500: CustomRoute = {
  path: "/500",
  name: "500",
  component: () => import("@/views/builtin/500/index.vue"),
  meta: {
    constant: true,
    keepAlive: false
  }
};

export const builtinRoutes: CustomRoute[] = [
  ROOT_ROUTE,
  ROUTE_404,
  ROUTE_403,
  ROUTE_500
];
